package com.hand.demo.infra.repository.impl;

import org.apache.commons.collections.CollectionUtils;
import org.hzero.mybatis.base.impl.BaseRepositoryImpl;
import org.springframework.stereotype.Component;
import com.hand.demo.domain.entity.HhrTaBasicInfo;
import com.hand.demo.domain.repository.HhrTaBasicInfoRepository;
import com.hand.demo.infra.mapper.HhrTaBasicInfoMapper;

import javax.annotation.Resource;
import java.util.List;

/**
 * 简历基本信息解析表(HhrTaBasicInfo)资源库
 *
 * @author
 * @since 2025-06-16 12:16:55
 */
@Component
public class HhrTaBasicInfoRepositoryImpl extends BaseRepositoryImpl<HhrTaBasicInfo> implements HhrTaBasicInfoRepository {
    @Resource
    private HhrTaBasicInfoMapper hhrTaBasicInfoMapper;

    @Override
    public List<HhrTaBasicInfo> selectList(HhrTaBasicInfo hhrTaBasicInfo) {
        return hhrTaBasicInfoMapper.selectList(hhrTaBasicInfo);
    }

    @Override
    public HhrTaBasicInfo selectByPrimary(Long id) {
        HhrTaBasicInfo hhrTaBasicInfo = new HhrTaBasicInfo();
        hhrTaBasicInfo.setId(id);
        List<HhrTaBasicInfo> hhrTaBasicInfos = hhrTaBasicInfoMapper.selectList(hhrTaBasicInfo);
        if (hhrTaBasicInfos.size() == 0) {
            return null;
        }
        return hhrTaBasicInfos.get(0);
    }

}

